/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.navbar-nav .nav-link.active {
    background-color: rgba(255,255,255,0.2);
    border-radius: 4px;
}

/* 容器样式 */
.container-fluid {
    max-width: 1400px;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-header {
    font-weight: 600;
    font-size: 1.1rem;
}

/* 按钮样式 */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
}

.btn-info {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

.btn-info:hover {
    background-color: #0aa2c0;
    border-color: #0a91b6;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-warning:hover {
    background-color: #ffca2c;
    border-color: #ffc720;
}

/* 表单样式 */
.form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: none;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

/* 消息提示样式 */
.alert {
    border-radius: 6px;
    border: none;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
}

/* 进度条样式 */
.progress {
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* 模态框样式 */
.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
}

/* 表格样式 */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

/* 分页样式 */
.pagination {
    margin-top: 1.5rem;
}

.page-item .page-link {
    border-radius: 6px;
    margin: 0 0.25rem;
    color: #0d6efd;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.page-item .page-link:hover {
    background-color: #f8f9fa;
    color: #0a58ca;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* 标签页样式 */
.nav-tabs {
    border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
    color: #495057;
    border-radius: 6px 6px 0 0;
    margin-bottom: -1px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
    background-color: #f8f9fa;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    font-weight: 600;
}

.tab-content {
    padding: 1.5rem 0;
}

/* 列表组样式 */
.list-group {
    border-radius: 8px;
    overflow: hidden;
}

.list-group-item {
    border: 1px solid #dee2e6;
    border-radius: 0;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.list-group-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.list-group-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* 徽章样式 */
.badge {
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25em 0.5em;
}

/* 卡片组样式 */
.card-group > .card {
    border-radius: 8px;
    margin-right: 0.75rem;
}

.card-group > .card:last-child {
    margin-right: 0;
}

/* 统计卡片样式 */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card-title {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.stat-card-change {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* 图表容器样式 */
.chart-container {
    position: relative;
    margin: auto;
}

/* 任务状态和优先级指示器 */
.task-status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.task-status-todo {
    background-color: #e9ecef;
    color: #495057;
}

.task-status-in-progress {
    background-color: #cce7ff;
    color: #004085;
}

.task-status-completed {
    background-color: #d4edda;
    color: #155724;
}

.task-status-archived {
    background-color: #f8f9fa;
    color: #6c757d;
}

.task-priority-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.task-priority-high {
    background-color: #f8d7da;
    color: #721c24;
}

.task-priority-medium {
    background-color: #fff3cd;
    color: #856404;
}

.task-priority-low {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* 分类颜色指示器 */
.category-color-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 0.25rem;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* 搜索框样式 */
.search-input-group {
    position: relative;
}

.search-input-group .form-control {
    padding-left: 2rem;
}

.search-input-group .fa-search {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* 加载指示器 */
.loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* 确认对话框样式 */
.confirm-dialog {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.confirm-dialog-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.confirm-dialog-body {
    padding: 1.5rem;
}

.confirm-dialog-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* 通知样式 */
.notification-item {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background-color: #f8f9fa;
    border-left: 4px solid #0d6efd;
}

.notification-icon {
    margin-right: 1rem;
    font-size: 1.25rem;
}

.notification-content {
    flex: 1;
}

.notification-time {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background-color: #e9ecef;
    color: #495057;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* 日期选择器样式 */
.date-picker {
    position: relative;
}

.date-picker .form-control {
    padding-right: 2rem;
}

.date-picker .fa-calendar {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

/* 时间选择器样式 */
.time-picker {
    position: relative;
}

.time-picker .form-control {
    padding-right: 2rem;
}

.time-picker .fa-clock-o {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

/* 颜色选择器样式 */
.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.color-option {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #000;
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-nav {
        margin-top: 0.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem;
    }
    
    .card-group > .card {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .card-group > .card:last-child {
        margin-bottom: 0;
    }
    
    .stat-card-value {
        font-size: 1.5rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 0 1rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #f8f9fa;
    }
    
    .card {
        background-color: #2d2d2d;
        color: #f8f9fa;
    }
    
    .card-header {
        border-bottom-color: #404040;
    }
    
    .form-control {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #f8f9fa;
    }
    
    .form-control:focus {
        border-color: #0d6efd;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    }
    
    .table th {
        background-color: #2d2d2d;
        border-bottom-color: #404040;
    }
    
    .table th,
    .table td {
        border-top-color: #404040;
    }
    
    .table-hover tbody tr:hover {
        background-color: #3d3d3d;
    }
    
    .nav-tabs .nav-link {
        color: #adb5bd;
    }
    
    .nav-tabs .nav-link.active {
        color: #f8f9fa;
        background-color: #2d2d2d;
        border-color: #404040 #404040 #2d2d2d;
    }
    
    .nav-tabs .nav-link:hover {
        background-color: #3d3d3d;
        border-color: #404040 #404040 #404040;
    }
    
    .list-group-item {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #f8f9fa;
    }
    
    .list-group-item:hover {
        background-color: #3d3d3d;
    }
    
    .modal-content {
        background-color: #2d2d2d;
        color: #f8f9fa;
    }
    
    .modal-header,
    .modal-footer {
        border-color: #404040;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 打印样式 */
@media print {
    .navbar,
    .action-buttons,
    .btn,
    .pagination,
    .modal {
        display: none !important;
    }
    
    .container-fluid {
        max-width: 100%;
        padding: 0;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* 工具提示样式覆盖 */
.tooltip-inner {
    border-radius: 4px;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
}

/* 下拉菜单样式覆盖 */
.dropdown-menu {
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: none;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: #0d6efd;
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}